OBJ = censorwords.o utf8string.o acsmx.o 
LIB = libcensorwords.a
HOMEDIR = ../

CXX	= g++ 
FLAG = -fPIC -g -Wall -Wno-deprecated -D_DEBUG -D_STAT 
CXX	+= $(FLAG)
DEF	= -D_TRACE
GLOBINC	= -I$(HOMEDIR)/include/
GLOBLIB = -L$(HOMEDIR)/lib/

.PHONY : all clean

all : $(LIB) $(OBJ) $(EXE)
	mkdir -p $(HOMEDIR)/include/censorwords
	mkdir -p $(HOMEDIR)/lib
	mkdir -p $(HOMEDIR)/c++_swig
	cp -f censorwords.h $(HOMEDIR)/include/censorwords
	cp -f $(LIB) $(HOMEDIR)/lib/
	cp -f censorwords.h $(LIB) $(HOMEDIR)/c++_swig/

$(LIB) : $(OBJ)
	ar -crs $@ $^

censorwords.o : censorwords.cpp
	$(CXX) -c censorwords.cpp  
utf8string.o : utf8string.cpp
	$(CXX) -c utf8string.cpp 
acsmx.o : acsmx.cpp
	$(CXX) -c acsmx.cpp 

clean:
	rm -rf $(OBJ) $(LIB) $(EXE)

